#pragma once

namespace LightPlayer{

	enum TagList{
		eEnd = 0,

		// Display List tags
		ePlaceObject = 4,
		ePlaceObject2 = 26,
		ePlaceObject3 = 70,
		eRemoveObject = 5,
		eRemoveObject2 = 28,
		eShowFrame = 1,

		// Control List tags
		eSetBackgroundColor = 9,
		eFrameLabel = 43,
		eProtect = 24,
		eExportAssets = 56,
		eImportAssets = 57,
		eEnableDebugger = 58,
		eEnableDebugger2 = 64,
		eScriptLimits = 65,
		eSetTabIndex = 66,
		eFileAttributes = 69,
		eImpotAssets2 = 71,
		eSymbolClass = 76,
		eMetadata = 77,
		eDefineScalingGrid = 78,
		eDefineSceneAndFrameLabelData = 86,

		// Actions List tags
		eDoAction = 12,
		eDoInitAction = 59,
		eDoABC = 82,

		// Character List Tags
		eDefineSprite = 39,
		eDefineShape = 2,
		eDefineShape2 = 22,
		eDefineShape3 = 32,
		eDefineShape4 = 83,
		eDefineMorphShape = 46,
		eDefineMorphShape2 = 84,

		// images
		eDefineBits = 6,
		eJPEGTables = 8,
		eDefineBitsJPEG2 = 21,
		eDefineBitsJPEG3 = 35,
		eDefineBitsLossLess = 20,
		eDefineBitsLossLess2 = 36,
		eDefineBitsJPEG4 = 90,
		
		// font and text
		eDefineFont = 10,
		eDefineFontInfo = 13,
		eDefineFontInfo2 = 62,
		eDefineFont2 = 48,
		eDefineFont3 = 75,
		eDefineFontAlignZones = 73,
		eDefineFontName = 88,
		eDefineText = 11,
		eDefineText2 = 33,
		eDefineEditText = 37,
		eCSMTextSettings = 74,
		eDefineFont4 = 91,

		// sound
		eDefineSound = 14,
		eStartSound = 15,
		eStartSound2 = 89,
		eSoundStreamHead = 18,
		eSoundStreamHead2 = 45,
		eSoundStreamBlock = 19,
		
		// button
		eDefineButton = 7,
		eDefineButton2 = 34,
		eDefineButtonCxform = 23,
		eDefineButtonSound = 17,
		
		// video
		eDefineVideoStream = 60,
		eVideoFrame = 61,

		// metadata list tags
		eEnableTelemetry = 93,
		eDefineBinaryData = 87
	};

	
	const char* getTagString( TagList tag );
	
	
	enum ActionCode{
		eActionEnd					= 0x0,
		eActionGotoFrame			= 0x81,
		eActionGetURL				= 0x83,
		eActionNextFrame			= 0x04,
		eActionPreviousFrame		= 0x05,
		eActionPlay					= 0x06,
		eActionStop					= 0x07,
		eActionToggleQuality		= 0x08,
		eActionStopSounds			= 0x09,
		eActionWaitForFrame			= 0x8A,
		eActionSetTarget			= 0x8B,
		eActionGoToLabel			= 0x8C,
		eActionPush					= 0x96,
		eActionPop					= 0x17,
		eActionAdd					= 0x0A,
		eActionSubtract				= 0x0B,
		eActionMultiply				= 0x0C,
		eActionDivide				= 0x0D,
		eActionEquals				= 0x0E,
		eActionLess					= 0x0F,
		eActionAnd					= 0x10,
		eActionOr					= 0x11,
		eActionNot					= 0x12,
		eActionStringEquals			= 0x13,
		eActionStringLength			= 0x14,
		eActionStringAdd			= 0x21,
		eActionStringExtract		= 0x15,
		eActionStringLess			= 0x29,
		eActionMBStringLength		= 0x31,
		eActionMBStringExtract		= 0x35,
		eActionToInteger			= 0x18,
		eActionCharToAscii			= 0x32,
		eActionAsciiToChar			= 0x33,
		eActionMBCharToAscii		= 0x36,
		eActionMBAsciiToChar		= 0x37,
		eActionJump					= 0x99,
		eActionIf					= 0x9D,
		eActionCall					= 0x9E,
		eActionGetVariable			= 0x1C,
		eActionSetVariable			= 0x1D,
		eActionGetURL2				= 0x9A,
		eActionGoToFrame2			= 0x9F,
		eActionSetTarget2			= 0x20,
		eActionGetProperty			= 0x22,
		eActionSetProperty			= 0x23,
		eActionCloneSprite			= 0x24,
		eActionRemoveSprite			= 0x25,
		eActionStartDrag			= 0x27,
		eActionEndDrag				= 0x28,
		eActionWaitForFrame2		= 0x8D,
		eActionTrace				= 0x26,
		eActionGetTime				= 0x34,
		eActionRandomNumber			= 0x30,
		eActionCallFunction			= 0x3D,
		eActionCallMethod			= 0x52,
		eActionConstantPool			= 0x88,
		eActionDefineFunction		= 0x9B,
		eActionDefineLocal			= 0x3C,
		eActionDefineLocal2			= 0x41,
		eActionDelete				= 0x3A,
		eActionDelete2				= 0x3B,
		eActionEnumarate			= 0x46,
		eActionEquals2				= 0x49,
		eActionGetMember			= 0x4E,
		eActionInitArray			= 0x42,
		eActionInitObject			= 0x43,
		eActionNewMethod			= 0x53,
		eActionNewObject			= 0x40,
		eActionSetMember			= 0x4F,
		eActionTargetPath			= 0x45,
		eActionWith					= 0x94,
		eActionToNumber				= 0x4A,
		eActionToString				= 0x4B,
		eActionTypeOf				= 0x44,
		eActionAdd2					= 0x47,
		eActionLess2				= 0x48,
		eActionModulo				= 0x3F,
		eActionBitAnd				= 0x60,
		eActionBitLShift			= 0x63,
		eActionBitOr				= 0x61,
		eActionBitRShift			= 0x64,
		eActionBitURShift			= 0x65,
		eActionBitXor				= 0x62,
		eActionDecrement			= 0x51,
		eActionIncrement			= 0x50,
		eActionPushDuplicate		= 0x4C,
		eActionReturn				= 0x3E,
		eActionStackSwap			= 0x4D,
		eActionStoreRegister		= 0x87,
		eActionInstanceOf			= 0x54,
		eActionEnumerate2			= 0x55,
		eActionStrictEquals			= 0x66,
		eActionGreater				= 0x67,
		eActionStringGreater		= 0x68,
		eActionDefineFunction2		= 0x8E,
		eActionExtends				= 0x69,
		eActionCastOp				= 0x2B,
		eActionImplementsOp			= 0x2C,
		eActionTry					= 0x8F,
		eActionThrow				= 0x2A,
	};

	const char* getActionString( ActionCode actionCode );
};